﻿using System;
using RSSReader.classesCustom;

namespace RSSReader
{
    public class Global : System.Web.HttpApplication
    {
        public static DataHandler dh2 = new DataHandler();
        /// <summary>
        /// xml data access should be separated from database data access
        /// xml readings will be temporized to a certain time amount
        /// whilst database access will be customized for every user
        /// once the user management will be implemented
        /// </summary>
                
        protected void Application_Start(object sender, EventArgs e)
        {                        
            //DataHandler dh = dh2;
            Application["dataHandler"]=dh2;            
        }

        protected void Session_Start(object sender, EventArgs e)
        {
            UserDataHandler udh = new UserDataHandler();
            Session["userDataHandler"] = udh;
        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {

        }

        protected void Session_End(object sender, EventArgs e)
        {
           
        }

        protected void Application_End(object sender, EventArgs e)
        {
            //dh = null;
        }

    }
}